{
  "properties" : { },
  "id" : "bf8a009755c840a7bc7ae6646e7e7f7f",
  "script" : null,
  "groupId" : "4c0c509172534572bbe1809900aeafa9",
  "name" : "根据条件查询mib列表",
  "createTime" : 1727071006557,
  "updateTime" : 1725324600710,
  "lock" : "1",
  "createBy" : "ndmp",
  "updateBy" : "ndmp",
  "path" : "listByCondition",
  "method" : "POST",
  "parameters" : [ ],
  "options" : [ ],
  "requestBody" : "{\r\n    \"name\": null,\r\n    \"oid\": null,\r\n    \"classification\": \"动态\"\r\n}",
  "headers" : [ ],
  "paths" : [ ],
  "responseBody" : "{\n    \"code\": 500,\n    \"success\": false,\n    \"data\": {},\n    \"msg\": \"系统维护中，请稍后重试。\"\n}",
  "description" : "",
  "requestBodyDefinition" : {
    "name" : null,
    "value" : null,
    "description" : null,
    "required" : false,
    "dataType" : "String",
    "type" : null,
    "defaultValue" : null,
    "validateType" : null,
    "error" : null,
    "expression" : null,
    "children" : null
  },
  "responseBodyDefinition" : {
    "name" : null,
    "value" : null,
    "description" : null,
    "required" : false,
    "dataType" : "String",
    "type" : null,
    "defaultValue" : null,
    "validateType" : null,
    "error" : null,
    "expression" : null,
    "children" : null
  }
}
================================
import org.apache.commons.lang.StringUtils;

//.apply用不了
//  var a=db.table('ndmp_mib').where()
// .like(StringUtils.isNotBlank(body.name),'name',body.name)
// .eq(StringUtils.isNotBlank(body.id),'id',body.id)
// .like(StringUtils.isNotBlank(body.alias),'alias',body.alias)
// .like(StringUtils.isNotBlank(body.oid),'oid',body.oid)
// .apply(StringUtils.isNotBlank(body.classification),"FIND_IN_SET({0},classification)",body.classification)
// .or()
// .like(StringUtils.isNotBlank(body.classification),'classification',body.classification)
// .select();

var sql ="""
select * from ndmp_mib   
<where>
    <if test="body.name!=null||body.name!=''">
    and name like concat('%', #{body.name},'%')
    </if>
    <if test="body.id!=null||body.id!=''">
    and id =  #{body.id}
    </if>
    <if test="body.alias!=null||body.alias!=''">
     and alias like concat('%', #{body.alias},'%')
    </if>
    <if test="body.oid!=null||body.oid!=''">
    and oid like concat('%', #{body.oid},'%')
    </if>
    <if test="body.classification!=null||body.classification!=''">
    and FIND_IN_SET(#{body.classification},classification)
    </if>
    <if test="body.classification!=null||body.classification!=''">
     or classification like concat('%', #{body.classification},'%')
    </if>
</where>
"""
return db.select(sql);
